FROM ubuntu:16.04
MAINTAINER Lizhen "lizhen@example.com"
ENV REFRESHED_AT 2019-01-08

# 覆盖原文件
ADD sources.list /etc/apt/sources.list

RUN apt-get update
RUN apt-get -y -q install nginx
RUN mkdir -p /var/www/html
ADD nginx/global.conf /etc/nginx/conf.d/
ADD nginx/nginx.conf /etc/nginx/nginx.conf
EXPOSE 80

## nginx/目录下下载文件
# wget https://raw.githubusercontent.com/jamtur01/dockerbook-code/master/code/5/sample/nginx/global.conf
# wget https://raw.githubusercontent.com/jamtur01/dockerbook-code/master/code/5/sample/nginx/nginx.conf
# 构建镜像lizhen/sample
# sudo docker build -t lizhen/sample .
# website/目录下下载文件
# wget https://raw.githubusercontent.com/jamtur01/dockerbook-code/master/code/5/sample/website/index.html
# 挂载目录到所有的virtualbox虚拟机上并重启
# \\?\H:\Source —> H/Source
# 创建容器website-demo
# sudo docker run -d -p 4100:80 --name website-demo -v $PWD/website:/var/www/html/website lizhen/sample nginx